
var TokenKey = 'JWT-Admin-Token'

import Cookies from 'js-cookie'
import request from '@utils/request';

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token, {
    expires: 30,
  })
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}
// 获取用户详细信息
export function getUserInfo() {
  return request({
    url: '/baseApi/getUserInfo',
    method: 'get'
  })
}